1. Field of the Invention
The present invention relates to a technique of correcting a defective pixel of an image sensor.
2. Description of the Related Art
In image sensors such as CCDs, pixels are produced in the form of a two-dimensional array by using semiconductor technology. Some pixels do not have sufficiently high sensitivity due to a failure or degradation that can occur during or after the process of producing image sensors. Such defective pixels do not output a correct signal corresponding to the intensity of incident light, and thus a white or black dot, which is not included in a subject, appears in an image.
It is known to detect defective pixels included in an image sensor and store information associated with defective pixels in a nonvolatile memory during the process of producing the image sensor in a factory such that degradation in image quality due to defective pixels can be compensated for based on the defect information by signal processing.
A great increase in the number of pixels of an image sensor has been achieved in recent years. The upper limit in the number of pixels was several hundred thousands a few years ago, but now image sensors having a few million pixels are available. However, the increase in the number of pixels causes an increase in probability that an image sensor has a defective pixel, despite advances in production techniques of image sensors. Low cost is required for images sensors for use in consumer products. To achieve a high production yield to meet the low-cost requirement, a large number of defective pixels must be accepted.
However, storing information indicating locations of a large number of defective pixels in an expensive nonvolatile memory results in an increase in total cost.
To avoid the above problem, Japanese Patent Laid-Open No. 06-030425 discloses a technique of correcting defective pixels such that the signal level of each pixel of an image captured by an image sensor is compared with signal levels of adjacent pixels with a similar color, and the pixel is regarded to be defective if the difference in signal level is greater than a predetermined threshold value. This technique allows defective pixels to be corrected without needing defective pixel position information stored in a nonvolatile memory. Japanese Patent Laid-Open No. 2002-027323 discloses a defective pixel correction technique that needs a less capacity of a nonvolatile memory. In this technique, information associated with only defective pixels located in a particular area of an image sensor is stored in a nonvolatile memory. After defective pixels are corrected based on the information stored in the nonvolatile memory, defective pixels located in the outside of the particular area are detected and corrected each time an image is captured by the image sensor. This technique makes it possible to handle a large number of defective pixels by using a limited capacity of the nonvolatile memory.
In the techniques described above, the correction is made without taking into account what kind of pattern the image has in the vicinity of each defective pixel. This can cause a problem that, for example, when edges of an image intersect each other in a local area including a plurality of defective pixels, a proper correction is not made and degradation in image quality occurs.
Japanese Patent Laid-Open No. 07-336602 discloses a defective pixel correction technique in which boundaries between pixels in the vicinity of a defective pixel are compared with each other, and a method of interpolation for determining a corrected pixel value is properly selected depending on a boundary pattern, thereby correcting the defective pixel without causing degradation in image quality.
However, in the technique disclosed in Japanese Patent Laid-Open No. 06-030425, when the signal level of each pixel of an image captured by an image sensor is compared with signals levels of adjacent pixels with a similar color and a determination on whether the pixel is defective is made by determining whether the difference in signal level is greater than a predetermined threshold value, a high-frequency component such as an edge of a subject can be incorrectly detected as a defective pixel. A correction made based on the incorrect detection of a defective pixel causes degradation in image quality, which is a problem with this technique. In the technique disclosed in Japanese Patent Laid-Open No. 2002-027323, defective pixels located in the particular area are detected and corrected each time an image is captured by an image sensor, without taking account the possibility that a high-frequency component such as an edge of a subject is incorrectly regarded as a defective pixel.
In the technique disclosed in Japanese Patent Laid-Open No. 07-336602, patterns of boundaries of defective pixels are identified based on the premise that locations of defective pixels are known. To meet the above premise, it is required to store in advance information indicating locations of all defective pixels, the number of which will increase with the total number of pixels, in a nonvolatile memory.
Thus, there is a need for a technique of effectively correcting defective pixels without causing degradation in image quality.